package com.css.fxfzypg.modules.maps.controller;

import com.css.fxfzypg.base.response.RestResponse;
import com.css.fxfzypg.modules.maps.service.KzsfResultsMapService;
import com.css.fxfzypg.modules.saresults.entity.DzqhQpBasicMapEntity;
import com.css.fxfzypg.modules.saresults.vo.SaResultsHlVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * @author zyt
 * @create 2022-12-27 15:30
 * 抗震设防成果管理地图模块
 */
@RestController
@RequestMapping("/kzsfResultsMap")
@Slf4j
public class KzsfResultsMapController {

    @Resource
    private KzsfResultsMapService kzsfResultsMapService;//地图使用

    /**
     * 抗震设防成果目录项目信息地图圈选查询
     * @param
     * @return
     */
    @GetMapping("queryKzsfResultsProjectByGeomText")
    public RestResponse queryKzsfResultsProjectByGeomText(DzqhQpBasicMapEntity mapEntity, HttpServletRequest request) {
        String geomText = String.valueOf(request.getParameter("geomText"));
        return RestResponse.succeed(kzsfResultsMapService.queryKzsfResultsProjectByGeomText(mapEntity, geomText));
    }

    /**
     * 抗震设防成果目录孔位信息地图圈选查询
     * @param
     * @return
     */
    @GetMapping("queryKzsfResultsHlByGeomText")
    public RestResponse queryKzsfResultsHlByGeomText(SaResultsHlVo saResultsHlVo, HttpServletRequest request) {
        String geomText = String.valueOf(request.getParameter("geomText"));
        return RestResponse.succeed(kzsfResultsMapService.queryKzsfResultsHlByGeomText(saResultsHlVo, geomText));
    }

    /**
     * 局级成果项目信息地图圈选查询
     * @param
     * @return
     */
    @GetMapping("queryBureauLevelResultsProjectByGeomText")
    public RestResponse queryBureauLevelResultsProjectByGeomText(DzqhQpBasicMapEntity mapEntity, HttpServletRequest request) {
        String geomText = String.valueOf(request.getParameter("geomText"));
        return RestResponse.succeed(kzsfResultsMapService.queryBureauLevelResultsProjectByGeomText(mapEntity, geomText));
    }

    /**
     * 局级成果孔位信息地图圈选查询
     * @param
     * @return
     */
    @GetMapping("queryBureauLevelResultsHlByGeomText")
    public RestResponse queryBureauLevelResultsHlByGeomText(SaResultsHlVo saResultsHlVo, HttpServletRequest request) {
        String geomText = String.valueOf(request.getParameter("geomText"));
        return RestResponse.succeed(kzsfResultsMapService.queryBureauLevelResultsHlByGeomText(saResultsHlVo, geomText));
    }

    /**
     * 省级成果项目信息地图圈选查询
     * @param
     * @return
     */
    @GetMapping("queryProvinceResultsProjectByGeomText")
    public RestResponse queryProvinceResultsProjectByGeomText(DzqhQpBasicMapEntity mapEntity, HttpServletRequest request) {
        String geomText = String.valueOf(request.getParameter("geomText"));
        return RestResponse.succeed(kzsfResultsMapService.queryProvinceResultsProjectByGeomText(mapEntity, geomText));
    }

    /**
     * 省级成果孔位信息地图圈选查询
     * @param
     * @return
     */
    @GetMapping("queryProvinceResultsHlByGeomText")
    public RestResponse queryProvinceResultsHlByGeomText(SaResultsHlVo saResultsHlVo, HttpServletRequest request) {
        String geomText = String.valueOf(request.getParameter("geomText"));
        return RestResponse.succeed(kzsfResultsMapService.queryProvinceResultsHlByGeomText(saResultsHlVo, geomText));
    }

    /**
     * 管理员项目信息地图圈选查询
     * @param
     * @return
     */
    @GetMapping("queryAdminProjectByGeomText")
    public RestResponse queryAdminProjectByGeomText(DzqhQpBasicMapEntity mapEntity, HttpServletRequest request) {
        String geomText = String.valueOf(request.getParameter("geomText"));
        return RestResponse.succeed(kzsfResultsMapService.queryAdminProjectByGeomText(mapEntity, geomText));
    }

    /**
     * 管理员孔位信息地图圈选查询
     * @param
     * @return
     */
    @GetMapping("queryAdminHlByGeomText")
    public RestResponse queryAdminHlByGeomText(SaResultsHlVo saResultsHlVo, HttpServletRequest request) {
        String geomText = String.valueOf(request.getParameter("geomText"));
        return RestResponse.succeed(kzsfResultsMapService.queryAdminHlByGeomText(saResultsHlVo, geomText));
    }
}
